package com.cdx.spring.life;

import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

/**
 * @author chedx
 * @data 2021/1/9 10:19 PM
 */
public class Product  implements InitializingBean, DisposableBean {

    Product () {
        System.out.println("Product . construct");
    }

    public  void myInit() {
        System.out.println("myinit");
    }

    public void afterPropertiesSet() throws Exception {
        System.out.println("afterPropertiesSet");
    }

    public void destroy() throws Exception {
        System.out.println("Spring 销毁");
    }

    public void myDestroy() throws Exception {
        System.out.println("我的 销毁");
    }
}
